package com.ny.controller;
import com.ny.entity.Result;
import com.ny.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/selectUser")
    public Result selectUser(){

        return Result.success(userService.findAll()+"66");
    }
    @PostMapping("/findUser")
    public Result findUser(String username,String password){

        return Result.success(userService.findUser(username,password));
    }



}
